package com.liangzhong.modules.winebar.command
{
	import com.liangzhong.constants.ApplicationConstants;
	import com.liangzhong.proxy.winebar.WinebarProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 *酒吧 
	 * @author lake
	 * 
	 */	
	public class WinebarCommand extends SimpleCommand
	{
		public function WinebarCommand()
		{
			super();
		}
		override public function execute(notification :INotification):void
		{
			var proxy :WinebarProxy = facade.retrieveProxy(WinebarProxy.ProxyName) as WinebarProxy;
			switch(notification.getName())
			{
				case ApplicationConstants.WINEBAR_GET_INFO://获取酒吧信息
				{
					proxy.getWinebarInfo(notification.getBody());
					break;
				}
				case ApplicationConstants.WINEBAR_GRADE_UP://升级
				{
					proxy.gradeUp();
					break;
				}
				case ApplicationConstants.WINEBAR_ENTER://进入酒吧
				{
					proxy.enterBar()
					break;
				}
				case ApplicationConstants.WINEBAR_LEAVE://离开结算
				{
					proxy.leaveBar()
					break;
				}
				case ApplicationConstants.WINEBAR_GETAWARD://领取奖励
				{
					proxy.gewAward(notification.getBody() as int);
					break;
				}
			}
		}
	}
}